package com.zmn.oms.persistence.interfaces.serviceitem;

import com.zmn.oms.model.entity.serviceitem.OrderServiceItem;

import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface OrderServiceItemDao {

	int countProExtIdByOrderId(Long orderId);

	OrderServiceItem selectByPrimaryKey(Long itemId);

	List<OrderServiceItem> listOrderServiceItemByOrderIdList(@Param("orderIdList") List<Long> orderIdList);

	List<OrderServiceItem> listByOrderId(Long orderId);

	List<OrderServiceItem> listDynamicByOrderId(@Param("query") String query, @Param("orderId") Long orderId);

	int insertAll(@Param("serviceItemList") List<OrderServiceItem> serviceItemList);

	void updateByKey(OrderServiceItem orderServiceItem);

	int deleteByPrimaryKey(Long itemId);

	int deleteByProExtId(Long proExtId);

	int deleteByOrderId(Long orderId);

	Integer deleteByOrderIdAndServiceItemId(Long orderId, Integer servItemId);
}